// <copyright file="ErrorDisplayForm.cs" company="Sinclair Community College">
// Copyright (c) Sinclair Community College. All rights reserved.
// </copyright>

namespace SinclairCC.AppVSuite.DuplicateRootDetector
{
    using System;
    using System.Data;
    using System.Windows.Forms;

    /// <summary>
    /// A Windows Form that displays any errors that occurred during the data gathering process.
    /// </summary>
    internal partial class ErrorDisplayForm : Form
    {
        /// <summary>
        /// The error data to be displayed on the form.
        /// </summary>
        private DataTable errorTable;

        /// <summary>
        /// Initializes a new instance of the ErrorDisplayForm class.
        /// </summary>
        /// <param name="errorTable">
        /// The error data to be displayed on the form.
        /// </param>
        public ErrorDisplayForm(DataTable errorTable)
        {
            this.InitializeComponent();

            this.errorTable = errorTable;
            this.errorView.DataSource = this.errorTable;
        }
    }
}